home *** CD-ROM | disk | FTP | other *** search
- on getNetData
- global myFile
- if the machineType = 256 then
- set i to the moviePath & "\ADS\net.dat"
- else
- set i to the moviePath & "ADS:net.dat"
- end if
- set DaPath to i
- if objectp(myFile) then
- set myFile to 0
- end if
- set myFile to new(xtra("fileio"))
- openFile(myFile, DaPath, 1)
- set Adinfo to readFile(myFile)
- put Adinfo into field "netData"
- closeFile(myFile)
- set myFile to 0
- end
-
- on countNetAds
- global numBanners
- set numBanners to the lineCount of member "netData"
- put numBanners
- end
-
- on importNetAds
- global myFile, numBanners
- if the machineType = 256 then
- set i to the moviePath & "ADS\netList.dat"
- else
- set i to the moviePath & "ADS:netList.dat"
- end if
- set DaPath to i
- if objectp(myFile) then
- set myFile to 0
- end if
- set myFile to new(xtra("fileio"))
- openFile(myFile, DaPath, 1)
- set Adinfo to readFile(myFile)
- put Adinfo into field "netList"
- closeFile(myFile)
- set myFile to 0
- if the machineType = 256 then
- set finalPath to the moviePath & "ADS\"
- else
- set finalPath to the moviePath & "ADS:"
- end if
- set the itemDelimiter to TAB
- set flibbertyGibbet to the number of items in field "netList"
- if numBanners = 3 then
- repeat with x = 1 to 6
- set canOfWhupAss to finalPath & item x of field "netList"
- set the fileName of member (x + 10) of castLib "ad banners" to canOfWhupAss
- end repeat
- else
- if numBanners = 4 then
- repeat with x = 1 to 8
- set canOfWhupAss to finalPath & item x of field "netList"
- set the fileName of member x of castLib "ad banners" to canOfWhupAss
- end repeat
- else
- alert("Import error.")
- end if
- end if
- set the itemDelimiter to ","
- end
-